# -*- coding: utf-8 -*-
import xbmc, xbmcgui, xbmcplugin, xbmcaddon, urllib2, urllib, re, string, sys, os, gzip, StringIO

# Plugin constants 
__addonname__ = "星际老男孩(YouKu)"
__addonid__ = "plugin.video.scboy"
__addon__ = xbmcaddon.Addon(id=__addonid__)
__addonicon__ = os.path.join( __addon__.getAddonInfo('path'), 'icon.png' )

UserAgent = 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3'

def rootList():
    match = [['path1', 'id1', 'name1'],['path2', 'id2', 'name2']]
    handle=int(sys.argv[1])
    for path, id, name in match:
        li = xbmcgui.ListItem(name)
        xbmcplugin.addDirectoryItem(handle,'http://tv1.btv.com.cn/asset/2012/03/27/BTV1_20120327_183405049_742928_23560.mp4', li, False, 2)
    xbmcplugin.endOfDirectory(handle)

rootList()

